<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">


  <link rel="apple-touch-icon" sizes="180x180" href="https://www.wulihub.com.cn/gc/Wez0VG/images/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-16x16.png">
  <link rel="mask-icon" href="https://www.wulihub.com.cn/gc/Wez0VG/images/logo.svg" color="#222">

<link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/main.css">



<link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free@6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://npm.elemecdn.com/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"nobige.cn","root":"/","images":"https://www.wulihub.com.cn/gc/Wez0VG/images","scheme":"Gemini","darkmode":false,"version":"8.12.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/config.js"></script>

    <meta name="description" content="Photo by Maurits Verschoren on Unsplash  Android studio 模拟器访问本机测试网站,资源     网络地址 说明    10.0.2.1 路由器&#x2F;网关地址   10.0.2.2 主机回环接口的特殊别名（即，开发计算机上的 127.0.0.1）   10.0.2.3 第一个 DNS 服务器   10.0.2.4 &#x2F; 10.0.">
<meta property="og:type" content="article">
<meta property="og:title" content="android错误笔记">
<meta property="og:url" content="https://nobige.cn/post/20200808-android_cuo_wu_bi_ji/index.html">
<meta property="og:site_name" content="NoBige-JackCh3n">
<meta property="og:description" content="Photo by Maurits Verschoren on Unsplash  Android studio 模拟器访问本机测试网站,资源     网络地址 说明    10.0.2.1 路由器&#x2F;网关地址   10.0.2.2 主机回环接口的特殊别名（即，开发计算机上的 127.0.0.1）   10.0.2.3 第一个 DNS 服务器   10.0.2.4 &#x2F; 10.0.">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20200808-android_cuo_wu_bi_ji/maurits-verschoren-g6Bpc_p4shc-unsplash.jpg">
<meta property="article:published_time" content="2020-08-08T12:36:12.000Z">
<meta property="article:modified_time" content="2024-11-07T02:59:06.310Z">
<meta property="article:author" content="JackCh3n">
<meta property="article:tag" content="android">
<meta property="article:tag" content="错误">
<meta property="article:tag" content="常用">
<meta property="article:tag" content="合集">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20200808-android_cuo_wu_bi_ji/maurits-verschoren-g6Bpc_p4shc-unsplash.jpg">


<link rel="canonical" href="https://nobige.cn/post/20200808-android_cuo_wu_bi_ji/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"en","comments":true,"permalink":"https://nobige.cn/post/20200808-android_cuo_wu_bi_ji/","path":"post/20200808-android_cuo_wu_bi_ji/","title":"android错误笔记"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>android错误笔记 | NoBige-JackCh3n</title>
  
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"UA-122817633-1","only_pageview":true}</script>
  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/google-analytics.js"></script>

  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?96741f92c07d010c0ddd1d02197893e2"></script>




  <noscript>
    <link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">NoBige-JackCh3n</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">copy to my blog</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>Home</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="user fa-fw"></i>About</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="tags fa-fw"></i>Tags</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="th fa-fw"></i>Categories</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="archive fa-fw"></i>Archives</a></li><li class="menu-item menu-item-sitemap"><a href="/sitemap.xml" rel="section"><i class="sitemap fa-fw"></i>Sitemap</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>Search
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="Searching..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-overview-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="JackCh3n"
      src="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
  <p class="site-author-name" itemprop="name">JackCh3n</p>
  <div class="site-description" itemprop="description">Record the pit filling process with words</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">146</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">279</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/jackch3n" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;jackch3n" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
      </span>
  </div>


  <div class="links-of-blogroll site-overview-item animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://vercel.com/?f=nobige" title="https:&#x2F;&#x2F;vercel.com?f&#x3D;nobige" rel="noopener" target="_blank">vercel</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.jsdelivr.com/?f=nobige" title="https:&#x2F;&#x2F;www.jsdelivr.com?f&#x3D;nobige" rel="noopener" target="_blank">jsdelivr</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.upyun.com/?f=nobige" title="https:&#x2F;&#x2F;www.upyun.com?f&#x3D;nobige" rel="noopener" target="_blank">upyun</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://coding.net/?f=nobige" title="https:&#x2F;&#x2F;coding.net?f&#x3D;nobige" rel="noopener" target="_blank">coding</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://unsplash.com/?f=nobige" title="https:&#x2F;&#x2F;unsplash.com?f&#x3D;nobige" rel="noopener" target="_blank">unsplash</a>
        </li>
    </ul>
  </div>

        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="en">
    <link itemprop="mainEntityOfPage" href="https://nobige.cn/post/20200808-android_cuo_wu_bi_ji/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
      <meta itemprop="name" content="JackCh3n">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="NoBige-JackCh3n">
      <meta itemprop="description" content="Record the pit filling process with words">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="android错误笔记 | NoBige-JackCh3n">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          android错误笔记
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2020-08-08 20:36:12" itemprop="dateCreated datePublished" datetime="2020-08-08T20:36:12+08:00">2020-08-08</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">Edited on</span>
      <time title="Modified: 2024-11-07 10:59:06" itemprop="dateModified" datetime="2024-11-07T10:59:06+08:00">2024-11-07</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">In</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E9%94%99%E8%AF%AF/" itemprop="url" rel="index"><span itemprop="name">错误</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="Views" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">Views: </span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20200808-android_cuo_wu_bi_ji/maurits-verschoren-g6Bpc_p4shc-unsplash.jpg" alt="Sunflower"></p>
<p><em>Photo by Maurits Verschoren on Unsplash</em></p>
<blockquote>
<p>Android studio 模拟器访问本机测试网站,资源</p>
</blockquote>
<table>
<thead>
<tr>
<th align="left">网络地址</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">10.0.2.1</td>
<td align="left">路由器&#x2F;网关地址</td>
</tr>
<tr>
<td align="left">10.0.2.2</td>
<td align="left">主机回环接口的特殊别名（即，开发计算机上的 127.0.0.1）</td>
</tr>
<tr>
<td align="left">10.0.2.3</td>
<td align="left">第一个 DNS 服务器</td>
</tr>
<tr>
<td align="left">10.0.2.4 &#x2F; 10.0.2.5 &#x2F; 10.0.2.6</td>
<td align="left">可选的第二个、第三个和第四个 DNS 服务器（如果有）</td>
</tr>
<tr>
<td align="left">10.0.2.15</td>
<td align="left">模拟设备网络&#x2F;以太网接口</td>
</tr>
<tr>
<td align="left">127.0.0.1</td>
<td align="left">模拟设备回环接口</td>
</tr>
</tbody></table>
<p>————————————————<br>参考链接：<a target="_blank" rel="noopener" href="https://developer.android.com/studio/run/emulator-networking?hl=zh-cn">https://developer.android.com/studio/run/emulator-networking?hl=zh-cn</a></p>
<blockquote>
<p>打包安卓报错error: resource android:attr&#x2F;fontStyle not found.</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">原因是</span><br><span class="line">compileSdkVersion 25</span><br><span class="line">低于</span><br><span class="line">implementation &#x27;com.android.support:appcompat-v7:27.0.0&#x27;</span><br><span class="line"></span><br><span class="line">解决办法，要么升sdk版本，要么降support版本</span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://blog.csdn.net/u011407338/article/details/91039651</span><br></pre></td></tr></table></figure>



<blockquote>
<p>AS中导入framework&#x2F;android包的技巧</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">首先，将android包放在lib目录下，并在项目的build.gradle目录的dependence下添加以下代码：</span><br><span class="line"></span><br><span class="line">gradle 3.0以上</span><br><span class="line">compileOnly files(&#x27;libs/android.jar&#x27;)</span><br><span class="line"></span><br><span class="line">gradle 3.0以下</span><br><span class="line">provide files(&#x27;libs/android.jar&#x27;)</span><br><span class="line"></span><br><span class="line">这里是为了在编译和打包时只编译/打包进使用过得二次编码包。</span><br><span class="line">因为使用compile或者implementation会将整个android.jar包打入apk包中，还会造成dex打包错误。</span><br><span class="line">同时注释以下依赖：</span><br><span class="line"></span><br><span class="line">//    implementation fileTree(include: [&#x27;*.jar&#x27;], dir: &#x27;libs&#x27;)</span><br><span class="line"></span><br><span class="line">最后，在项目根目录build.gradle目录下，需要使用全局配置路径的方式来引入jar包。</span><br><span class="line">  //添加以下代码，使android.jar包编译先于系统下android.jar</span><br><span class="line">        gradle.projectsEvaluated &#123;</span><br><span class="line">            tasks.withType(JavaCompile) &#123;</span><br><span class="line">                options.compilerArgs.add(&quot;-Xbootclasspath/p:$rootDir$&#123;File.separator&#125;app$&#123;File.separator&#125;libs$&#123;File.separator&#125;android.jar&quot;)</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">变量</span><br><span class="line">rootDir 项目的路径</span><br><span class="line">$ &#123;File.separator&#125;引用当前系统的分隔符，windows与mac不相同</span><br><span class="line"></span><br><span class="line">编译运行通过。</span><br><span class="line"></span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://github.com/jiaoery/JarDemo</span><br></pre></td></tr></table></figure>



<blockquote>
<p>各个 Android Gradle 插件版本所需的 Gradle 版本。要获得最佳性能，您应该使用 Gradle 和插件这两者的最新版本。</p>
</blockquote>
<p><strong>!!!一般文档以英文为准,1是更新比其他文档及时,2是翻译理解有所差异</strong></p>
<table>
<thead>
<tr>
<th align="left">Plugin version</th>
<th align="left">Required Gradle version</th>
</tr>
</thead>
<tbody><tr>
<td align="left">1.0.0 - 1.1.3</td>
<td align="left">2.2.1 - 2.3</td>
</tr>
<tr>
<td align="left">1.2.0 - 1.3.1</td>
<td align="left">2.2.1 - 2.9</td>
</tr>
<tr>
<td align="left">1.5.0</td>
<td align="left">2.2.1 - 2.13</td>
</tr>
<tr>
<td align="left">2.0.0 - 2.1.2</td>
<td align="left">2.10 - 2.13</td>
</tr>
<tr>
<td align="left">2.1.3 - 2.2.3</td>
<td align="left">2.14.1+</td>
</tr>
<tr>
<td align="left">2.3.0+</td>
<td align="left">3.3+</td>
</tr>
<tr>
<td align="left">3.0.0+</td>
<td align="left">4.1+</td>
</tr>
<tr>
<td align="left">3.1.0+</td>
<td align="left">4.4+</td>
</tr>
<tr>
<td align="left">3.2.0 - 3.2.1</td>
<td align="left">4.6+</td>
</tr>
<tr>
<td align="left">3.3.0 - 3.3.3</td>
<td align="left">4.10.1+</td>
</tr>
<tr>
<td align="left">3.4.0 - 3.4.3</td>
<td align="left">5.1.1+</td>
</tr>
<tr>
<td align="left">3.5.0 - 3.5.4</td>
<td align="left">5.4.1+</td>
</tr>
<tr>
<td align="left">3.6.0 - 3.6.4</td>
<td align="left">5.6.4+</td>
</tr>
<tr>
<td align="left">4.0.0+</td>
<td align="left">6.1.1+</td>
</tr>
</tbody></table>
<blockquote>
<p>failed to read PNG signature: file does not start with PNG signature.</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">原因:原图片可能jpg格式的图片,通过更改后缀的方式将jpg转为png后缀</span><br><span class="line"></span><br><span class="line">修复方式,用p或是其他软件另存为png图片即可</span><br><span class="line"></span><br><span class="line">Perhaps it&#x27;s not actually a PNG, but a JPG renamed to PNG.</span><br><span class="line">The problem could be because of the wrong extension of images.</span><br><span class="line"></span><br><span class="line">In my case, the file was a JPEG image but it was saved as PNG not converted to. </span><br><span class="line">In this situation change extension to the real one and convert to PNG then retry.</span><br><span class="line"></span><br><span class="line">For instance, you have ic_logo.png but it&#x27;s actually a JPG image.</span><br><span class="line">You should rename it back to ic_logo.jpg and use something like Photoshop to </span><br><span class="line">convert the image to PNG format.</span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://stackoverflow.com/questions/46177560/failed-to-read-png-signature-file-</span><br><span class="line">does-not-start-with-png-signature</span><br></pre></td></tr></table></figure>



<blockquote>
<p>Lint found fatal errors while assembling a release target. </p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">Lint found fatal errors while assembling a release target. </span><br><span class="line">To proceed, either fix the issues identified by lint, or modify your build script as follows:  ...</span><br><span class="line">android &#123;     </span><br><span class="line">	lintOptions &#123;       </span><br><span class="line">		checkReleaseBuilds false         </span><br><span class="line">		// Or, if you prefer, you can continue to check for errors in release builds,       </span><br><span class="line">		// but continue the build even when errors are found:         </span><br><span class="line"> 		abortOnError false      </span><br><span class="line"> 	&#125;</span><br><span class="line">&#125;</span><br><span class="line">修复:根据 项目目录下app/build/reports/lint-results-release-fatal.html 文件</span><br><span class="line">这个文件就详细描述了release时lint检测到的比较严重的结果然后逐一进行修复即可</span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://blog.csdn.net/aiynmimi/article/details/89401239</span><br></pre></td></tr></table></figure>



<blockquote>
<p>Duplicate class com.tencent.ijk.media.exo.BuildConfig found in modules</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">原因</span><br><span class="line">依赖了重复的资源文件，例如：</span><br><span class="line"></span><br><span class="line">lib中导入了A.aar文件，然后又在build.gradle中依赖了相同的A文件。</span><br><span class="line">依赖两个不同的资源文件，但是，这两个资源文件里面包含了相同的内容。</span><br><span class="line">解决方案</span><br><span class="line">去除重复的资源文件即可。</span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://blog.csdn.net/m0_46278918/article/details/107770473</span><br></pre></td></tr></table></figure>



<blockquote>
<p>Binary XML file line #20: Error inflating class ImageView RecyclerView</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">原因:应该是图片资源被放在drawable-v24 或是 mipmap-anydpi-v26夹中</span><br><span class="line">解决:将文件移动到drawable或是mipmap文件夹中即可</span><br><span class="line"></span><br><span class="line">I had the same problem. my problem has occurred because I just had used images (icons) in the &quot;drawable-v24&quot; folder. I solved it by copying them into &quot;drawable&quot; folder</span><br><span class="line">————————————————</span><br><span class="line">参考链接：https://stackoverflow.com/questions/16698313/error-inflating-class-imageview</span><br></pre></td></tr></table></figure>



<blockquote>
<p>android隐藏标题栏（Action Bar）,全屏</p>
</blockquote>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">在Manifest对应的Activity设置NoTitleBar风格</span><br><span class="line">android:theme=&quot;@style/Theme.AppCompat.NoActionBar&quot;</span><br><span class="line"></span><br><span class="line">2.在代码中隐藏标题栏</span><br><span class="line">if (getSupportActionBar() != null)&#123;</span><br><span class="line">   getSupportActionBar().hide();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">3.去掉标题栏,需要注意的是，requestWindowFeature（）方法必须在setContentView（）调用前使用。</span><br><span class="line">this.requestWindowFeature(Window.FEATURE_NO_TITLE);</span><br><span class="line">setContentView(R.layout.activity_main);</span><br><span class="line"></span><br><span class="line">4.Activity全屏的设置。</span><br><span class="line">标题栏（Action Bar）是Activity的一部分，全屏只是会隐藏状态栏，对标题栏无影响</span><br><span class="line">getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,</span><br><span class="line">                WindowManager.LayoutParams.FLAG_FULLSCREEN);</span><br><span class="line"></span><br><span class="line">————————————————</span><br><span class="line">日期:2020/08/10</span><br><span class="line">参考链接：https://blog.csdn.net/daihuimaozideren/article/details/78224927</span><br></pre></td></tr></table></figure>


    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/android/" rel="tag"># android</a>
              <a href="/tags/%E9%94%99%E8%AF%AF/" rel="tag"># 错误</a>
              <a href="/tags/%E5%B8%B8%E7%94%A8/" rel="tag"># 常用</a>
              <a href="/tags/%E5%90%88%E9%9B%86/" rel="tag"># 合集</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/20200727-Html_he_Css_ji_Js_cuo_wu_chang_yong_ji_he/" rel="prev" title="Html和Css及Js错误常用集合">
                  <i class="fa fa-chevron-left"></i> Html和Css及Js错误常用集合
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/20200815-yong_shuo_E_pan_mei_hua_yang_shi/" rel="next" title="永硕E盘美化样式">
                  永硕E盘美化样式 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    
  <div class="comments" id="disqus_thread">
    <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
  </div>
  
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JackCh3n</span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="Total Visitors">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="Total Views">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>
    <br/>Powerful CDN service provided by 
  <a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/upyun_logo.png" height="66" style="display: list-item;" alt="upyun"></a> 
  <a target="_blank" rel="noopener" href="https://www.jsdelivr.com" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/jsdelivr_logo.svg" height="50" style="display: list-item;" alt="JsDelivr"></a>
  <p>
  <br/><a target="_blank" rel="noopener" href="https://pages.github.com/?f=nobige">Github Pages</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://vercel.com/?f=nobige">Vercel</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://www.netlify.com/?f=nobige">Netlify</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://coding.net/?f=nobige">coding</a>&nbsp;&nbsp;provides static publishing
  </p>

    </div>
  </footer>

  
  <script src="https://npm.elemecdn.com/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/comments.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/utils.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/motion.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/next-boot.js"></script>

  
<script src="https://npm.elemecdn.com/hexo-generator-searchdb@1.4.0/dist/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/search/local-search.js"></script>





  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<link rel="stylesheet" href="https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqusjs.css" integrity="sha256-GxdCIOyfxQ1OBfS99qAIJDoGK1ADuBsxhMTqXG82fAY=" crossorigin="anonymous">

<script class="next-config" data-name="disqusjs" type="application/json">{"enable":true,"api":"https://duosuo.nobige.cn/","apikey":"Kmo9kPwsir7ppp8tGpeGROCmUtW8tdZBOdBVowPC67xVfTS5uV1wr6s4kckvP95m","shortname":"nobige","js":{"url":"https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqus.js","integrity":"sha256-LVaMHPQ2zLqOc5rXSAfr4d1PIkEGNLyyUTDNPZmTtUw="}}</script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/comments/disqusjs.js"></script>

</body>
</html>
